package com.tuanbiao.ui.project;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.hzjq.data.entity.PmEntity;
import com.tuanbiao.R;

import timber.log.Timber;

public class ProjectManageAdapter extends BaseQuickAdapter<PmEntity, BaseViewHolder> {
    private final String TAG = this.getClass().getSimpleName();

    public ProjectManageAdapter() {
        super(R.layout.item_project_manage);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, PmEntity model) {
        Timber.i(TAG + model);
        holder.setBackgroundResource(R.id.rl_content,model.isSelect()?R.drawable.bg_solid_warning_r_10:R.drawable.bg_solid_white_r_10);
        holder.setImageResource(R.id.iv_check, model.isSelect() ? R.mipmap.ic_project_check : R.mipmap.ic_project_uncheck);
        holder.setText(R.id.tv_project_name_desc, model.getPmName())
//                .setText(R.id.tv_contract_code_desc, model.getPmHtId())
                .setText(R.id.tv_id_card_desc, model.getPmManagerCode());
    }
}
